#pragma once
#include "BaseFunByOneVar.h"

namespace Net
{

class FunBySqrt : public BaseFunByOneVar
{
public:
    FunBySqrt() : BaseFunByOneVar(FunType_E::Sqrt_E, "Sqrt")
    {

    }

    ~FunBySqrt()
    {

    }

    Value_t runFun(Value_t x) final
    {
        return std::sqrt(x);
    }

    Value_t runDiff(Value_t x) final
    {
        return 0.5 / std::sqrt(x);
    }
};

}